package org.pwwong.scalautils.property.listevents

import scala.collection.mutable.Location


class ListPropEvent[T](val prop:ListProp[T])
case class ClearEvent[T](_prop:ListProp[T]) extends ListPropEvent[T](_prop)

class ListElementEvent[T](_prop:ListProp[T], val index:Int, val location:Location, val elem:T) extends ListPropEvent[T](_prop)
case class AddEvent[T](_prop:ListProp[T], _index:Int, _location:Location, _elem:T) extends ListElementEvent[T](_prop, _index, _location, _elem)
case class RemoveEvent[T](_prop:ListProp[T], _index:Int, _location:Location, _elem:T) extends ListElementEvent[T](_prop, _index, _location, _elem)
case class UpdateEvent[T](_prop:ListProp[T], _index:Int, _location:Location, _elem:T) extends ListElementEvent[T](_prop, _index, _location, _elem)